home *** CD-ROM | disk | FTP | other *** search
Wrap
1 rem ********************************* 2 rem * virtual directory * 3 rem * by r.mason remjem software * 4 rem * runs on c-64,c-128 (40 or 80c)* 5 rem * modified for 1581 * 6 rem * by tim mitchell * 7 rem * 02/19/88 * 8 rem * (to list on c-64-del line 15) * 9 rem ********************************* 10 poke53280,0:poke53281,0 20 print"[147][158]"rg$" virtual directory ";rg$:print"":printrg$" released to public domain 6/20/85":printrg$" by robert e. mason":printrg$" output to screen or printer?" 30 getz$:ifz$=""then30 40 ifz$="s"thens=1:goto70 50 ifz$="p"thenp=1:open4,4:goto80 60 goto30 70 printrg$" output to screen":goto90 80 printrg$" output to printer" 90 printrg$" which drive? (8-9) " 91 getk$:ifk$=""then91 92 k=val(k$):ifk<8ork>9thenk=8 93 dv=k:df$="":df$=df$+"[158]disk format=" 95 printrg$" place disk to be read in drive":printrg$" press any key when ready" 100 getz$:ifz$=""then100 101 open15,dv,15:print#15,"i0:":open8,dv,8,"$":gosub900:get#8,a$,b$:ifa$="a"thentr=18 102 b$=b$+chr$(0) 103 iftr=18andasc(b$)=0thenbf=664:df$=df$+"1541[146]":print#15,"u0>m0":goto107 104 ifasc(b$)=128thenbf=1328:df$=df$+"1571[146]":print#15,"u0>m1":goto107 105 ifa$="d"andasc(b$)=0thentr=40:bf=3160:df$=df$+"1581[146]":goto107 106 df$=df$+"unknown":tr=0:bf=0 107 close8:close15:printrg$" "df$ 109 fori=1to8:readp(i):next:a=1:pb=144:iftr=40thena=3:pb=4 110 b$="":open15,dv,15:print#15,"i0:":open8,dv,8,"#":dn$="disk name: ":print#15,"u1:8,0,"tr;0:gosub900:print#15,"b-p:8,"pb 111 fori=1to23:get#8,b$:b$=chr$(asc(b$+chr$(0))):ifb$=chr$(160)thenb$=" " 112 dn$=dn$+b$:next:ifpthenprintrg$" "dn$ 140 t$="[147]"+dn$:t4$="[146][159] start file name file no. load":t3$=" tk bk on disk type bks addr":ifsthenprintt$:print,df$:printt4$:printt3$ 150 t1$=" start file name file no. load":t2$=" tk bk on disk type bks addr" 151 ifpthenprint#4,dn$:print#4,,df$:print#4,t1$" "t1$:print#4,t2$" "t2$:print#4 160 print#15,"u1:8,0,"tr;a:gosub900:ifsthenprint"directory block";tr;"-";a 170 ifpthenprint#4:print#4,"directory block";tr;"-";a 180 print#15,"b-p:8,1":get#8,a$:nb=asc(a$+chr$(0)):fori=1to8:print#15,"b-p:8,"p(i)+1:get#8,bl$,se$:bl=asc(bl$+chr$(0)):bl$=str$(bl):iflen(bl$)<3thenbl$=" "+bl$ 190 d$=bl$:ifbl=0thenf1=1:goto600 200 se=asc(se$+chr$(0)):se$=str$(se):iflen(se$)<3thense$=" "+se$ 210 d$=d$+se$+" ":forj=1to16:get#8,b$:b$=chr$(asc(b$+chr$(0))):ifb$=chr$(129)thenb$="[193]":goto270 220 ifb$=chr$(160)thenb$=" ":goto270 230 ifb$=chr$(192)thenb$=chr$(45):goto270 240 ifb$<chr$(32)thenb$="?":goto270 250 ifb$>chr$(127)andb$<chr$(160)thenb$="?":goto270 260 ifasc(b$)=160thenb$=" ":goto270 270 d$=d$+b$:next:print#15,"b-p:8,"p(i):get#8,tf$:tf=asc(tf$+chr$(0)):iftf=130thend$=d$+" prg":goto370 280 iftf=129thend$=d$+" seq":goto370 290 iftf=131thend$=d$+" usr":goto370 300 iftf=132thend$=d$+" rel":goto370 301 iftf=133thend$=d$+" cbm":goto370 310 iftf=0thend$=d$+" *scr":goto370 320 iftf=1thend$=d$+" *seq":goto370 330 iftf=2thend$=d$+" *prg":goto370 340 iftf=3thend$=d$+" *usr":goto370 350 iftf=4thend$=d$+" *rel":goto370 351 iftf=5thend$=d$+" *cbm":goto370 352 iftf=193thend$=d$+" seq<":goto370 353 iftf=194thend$=d$+" prg<":goto370 354 iftf=195thend$=d$+" usr<":goto370 355 iftf=196thend$=d$+" rel<":goto370 356 iftf=197thend$=d$+" cbm<":goto370 360 d$=d$+"*"+str$(tf) 370 print#15,"b-p:8,"p(i)+28:get#8,sf$:sf=asc(sf$+chr$(0)):sf$=str$(sf):iftf>0thenbu=bu+sf 380 iflen(sf$)<3thensf$=" "+sf$:goto400 390 iflen(sf$)<4thensf$=" "+sf$ 400 d$=d$+sf$:print#15,"u1:8,0,"bl","se:print#15,"b-p:8,2":gosub900:get#8,la$,ha$:la=asc(la$+chr$(0))+256*asc(ha$+chr$(0)):la$=str$(la):iflen(la$)=2thend$=d$+" "+la$:goto450 410 iflen(la$)=3thend$=d$+" "+la$:goto450 420 iflen(la$)=4thend$=d$+" "+la$:goto450 430 iflen(la$)=5thend$=d$+" "+la$:goto450 440 d$=d$+la$ 450 l=l+1:ifpthenprint#4,d$" ";:goto470 460 printd$ 470 print#15,"u1:8,0,"tr;a:gosub900:d$="":next:ifsandl=16andf2=1thenl=0:goto560 480 ifsandl=16thenprint"[159]press any key to continue or q to quit";:l=0:goto540 490 ifsthen520 500 ifpandint(l/2)=59thenfork=1to8:print#4:next:l=0 510 ifpandl=0thenprint#4,dn$:print#4:print#4,t1$" "t1$:print#4,t2$" "t2$:print#4 520 ifnb<41thena=nb:goto160 530 goto600 540 getz$:ifz$=""then540 550 ifz$="q"then600 560 iff2=1then(NULL)40,0,79,24:f2=2:goto580 570 iff2=2then(NULL)0,0,39,24:f2=1 580 printt$:print:printt4$:printt3$:iff1then710 590 goto520 600 close8:close15:ifpandl<46then690 610 ifpandint(l/2)>45thenprintchr$(12):goto690 620 ifsandl<14then710 630 ifsandl>15thenf1=1:goto480 640 open15,dv,15,"i0:":close15:print"[159] another disk? (y/n) " 650 getz$:ifz$=""then650 660 ifz$="y"thenrun 670 ifz$="n"thenprint"[147]";:end 680 goto650 690 print#4:print#4,"blocks used:"bu:print#4,"blocks available:"bf-bu 691 forx=1toint(56-(l/2)):print#4:next:goto640 700 print#4,chr$(12):close4:goto640 710 print:print"blocks examined:"bu:iff1thenprint"blocks available:"bf-bu:f1=0:goto640 720 goto640 730 data2,34,66,98,130,162,194,226 900 input#15,en$,em$,et$,es$:ifval(en$)<20thenreturn 910 mn$=""+en$+" "+em$+" "+et$+" "+es$ 911 printrg$;spc(int(21-len(mn$)/2))mn$ 920 printrg$" [159]press any key to continue or q to quit" 921 gete$:ife$=""then921 922 ife$<>"q"thenrun 930 close8:close15 999 end